/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package admin.beans;

import abstractClasses.AbstractFilterableEntityList;
import entities.Notification;
import facades.NotificationFacade;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

/**
 *
 * @author Alvaro
 */
@Named(value = "adminReportCandidateBean")
@SessionScoped
public class AdminReportCandidateBean extends AbstractFilterableEntityList<Notification, NotificationFacade> implements Serializable {

    @Inject 
    private NotificationFacade notificationFacade;
    /**
     * Creates a new instance of AdminCompanyBean
     */
    public AdminReportCandidateBean() {
    }

        @Override
    @PostConstruct
    public void init(){
        setEntityFacade(getEntityFacadeInstance().get());
        List<Notification> entityList=notificationFacade.findNotificationsType(4);
        if(entityList==null){
            entityList=new ArrayList<Notification>();
        }
        Collections.reverse(entityList);
        setEntityList(entityList);
    }
    @Override
    public String redirectToViewEntity() {
        return null;
    }
    

}
